package com.hqj.demo.service;

import com.hqj.demo.dao.StudentDao;
import com.hqj.demo.dao.StudentDaoI;
import com.hqj.demo.entity.Student;

public class StudentServiceI implements StudentService{

    //从dao中获取数据 通过创建对象的方式获取类对象
    //private StudentDao sd = new StudentDaoI();

    private StudentDao sd;
    public void setSd(StudentDao sd) {//属性set方法进行注入
        this.sd = sd;
    }

    @Override
    public Student getStu() {
        Student stu = sd.get();
        return stu;
    }
}
